﻿@model ZhongheCms.Models.GswTblUser
@{
    var mc = "";
    var sc = "";
    var fc = "";
    if (string.IsNullOrEmpty(Model.ModuleName))
    {
        fc = "active";
    }
}
<div id="sidebar" class="sidebar responsive">
    <script type="text/javascript">
        try { ace.settings.check('sidebar', 'fixed') } catch (e) { }
    </script>

    <div class="sidebar-shortcuts" id="sidebar-shortcuts">
        <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
            <button class="btn btn-success">
                <a  target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=5254341&site=qq&menu=yes"> <i class="ace-icon fa fa-qq"></i></a>
            </button>
             @*data-rel="tooltip" data-placement="bottom" title="Default"*@
            <button class="btn btn-info">
               <a href="http://weibo.com/gsn2013"  target="_blank"> <i class="ace-icon fa fa-weibo"></i></a>
            </button>

            <button class="btn btn-warning">
              <a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=LBkeGRgfGB1sXV0CT0NB"  target="_blank">  <i class="ace-icon fa fa-envelope-o"></i></a>
            </button>

            <button class="btn btn-danger">
              <a href="#"  target="_blank">  <i class="ace-icon fa fa-comment-o"></i></a>
            </button>
        </div>

        <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
            <span class="btn btn-success"></span>

            <span class="btn btn-info"></span>

            <span class="btn btn-warning"></span>

            <span class="btn btn-danger"></span>
        </div>
    </div>
    <ul class="nav nav-list">
        <li class="@fc">
            <a href="#">
                <i class="menu-icon fa fa-tachometer"></i>
                <span class="menu-text">系统菜单</span>
            </a>

            <b class="arrow"></b>
        </li>
        @foreach (var item in Model.ModuleTexts)
        {
            if (item.ModuleText.Trim() == Model.ModuleName.Trim())
            {
                mc = "active open";
            }
            else
            {
                mc = "";
            }
            <li class="@mc">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fa @item.MenuIcon"></i>
                    <span class="menu-text">@item.ModuleText</span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    @foreach (var subitem in item.Funcions)
                    {
                        if (subitem.FuncName.Trim()== Model.FuncName.Trim() && subitem.ActionParam.Trim()==ViewBag.p)
                        {
                            sc = "active";
                            
                        }
                        else
                        {
                            sc = "";
                        }
                        <li class="@sc">
                            
                            <a href="/@subitem.ControllerName/@subitem.ActionName/0?m=@Html.Encode(item.ModuleText.Trim())&f=@Html.Encode(subitem.FuncName)&p=@Html.Encode(subitem.ActionParam.Trim())&fid=@subitem.Id&r=@subitem.RelateId" >
                                <i class="menu-icon fa fa-caret-right"></i>

                                @subitem.FuncName
                                 @if (!string.IsNullOrEmpty(subitem.ActionParam))
                                                                    {
                                                                        <span>(@subitem.ActionParam)</span>
                                                                    }
                             @*   <b class="arrow fa fa-angle-down"></b>*@
                            </a>

                            <b class="arrow"></b>


                        </li>
                               }




                </ul>
            </li>
                    }



    </ul>

    <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
        <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
    </div>

    <script type="text/javascript">
        try { ace.settings.check('sidebar', 'collapsed') } catch (e) { }
    </script>
</div>
